home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / sdimage.com / EXPBOX.DOC next >
Encoding:
Text File  |  1989-02-14  |  3.9 KB  |  109 lines

  1.                 Exploding Box Windows for TP BGI
  2.  
  3.                           ExpBox V1.03
  4.                      Written by Michael Day 
  5.                      as of 14 February 1989
  6.                  Copyright 1988 by Michael Day
  7.  
  8. This version is released to the public domain by the author as of
  9.                         14 February 1989
  10.  
  11.  
  12.      ExpBox  V1.03  explodes  a  box on  the  display  using  BGI 
  13. routines.  You can define the final box area, how many  steps  in 
  14. the  explosion, the speed of the explosion, and where to  explode 
  15. from. You can also define the color and pattern of the  exploding 
  16. box.  You  can  optionally  specify  rectangles  to  follow   the 
  17. explosion to add a bit more flash to the explosion. The color  of 
  18. the  rectangles can be separately defined. And just for  fun  you 
  19. can even specify sound effects.
  20.  
  21.      There is one basic procedure call to generate the  exploding 
  22. box "ExplodeBox". The procedure call contains all the information 
  23. needed to generate the exploding box.
  24.  
  25. Example:
  26.  
  27.      ExplodeBox(x1,y1,x2,y2:integer; 
  28.                 Step,Speed,Style:word;
  29.                 Color,Pattern,RColor:byte);
  30.  
  31. The  parameters  "x1,y1,x2,y2"  define the final  area  that  the 
  32. exploding  box will occupy. "Step" specifies how  many  explosion 
  33. steps  are to be used. "Speed" specifies how much delay to  place 
  34. between  each explosion step in milliseconds.  "Style"  specifies 
  35. how  the  explosion  is to occur (we will  discuss  this  later). 
  36. "Color" is the color of the box that will explode on the  screen. 
  37. "Pattern"  is the background pattern that is to be used  for  the 
  38. exploding  box,  and RColor is the color to use for  the  special 
  39. effects rectangles if they are used.
  40.  
  41. Style:
  42.  
  43. Bits  0-3 of the Style word control how the box will be  exploded 
  44. onto the screen. The possible explosion patterns are as follows:
  45.  
  46.      0=explode from center
  47.      1=explode from top 
  48.      2=explode from bottom
  49.      3=explode from left 
  50.      4=explode from right 
  51.      5=explode from top left corner
  52.      6=explode bot left corner 
  53.      7=explode top right corner
  54.      8=explode from bottom right corner
  55.      9 and Above = no explode
  56.  
  57. Rectangles:
  58.  
  59.      In  addition  to  the  box  being  exploded,  you  can   add 
  60. rectangles  inside  the box during the explosion. This  helps  to 
  61. make it look like there is more action going on. Bits 5,6, and  7 
  62. of  the Style word control the number of rectangles that will  be 
  63. displayed inside the exploding box.
  64.  
  65. 0 ($00) = No rectangles displayed
  66. 1 ($20) = One Rectangle displayed
  67. 2 ($40) = Two Rectangles displayed
  68. 3 ($60) = Three Rectangles displayed
  69. 4 ($80) = Four Rectangles displayed
  70. 5 ($A0) = Five Rectangles displayed
  71. 6 ($C0) = Six Rectangles displayed
  72. 7 ($E0) = Seven Rectangles displayed
  73.  
  74.      The rectangles are staggered one inside the other inside the 
  75. exploding box.
  76.  
  77.  
  78. Sound:
  79.      Bit 4 of the Style word controls the sound action. If bit  4 
  80. is  one,  then sound will be added to the explosion. If  bit4  is 
  81. off, then no sound is used.
  82.  
  83.  
  84. Step:
  85.      The  Step parameter controls how many steps will be used  to 
  86. explode  the box. If Step is zero, then no explosion will  occur. 
  87. The  box  will be drawn in one single action. Large  step  values 
  88. should  be  avoided  since  they will  seriously  slow  down  the 
  89. box explosion.
  90.  
  91. Speed:
  92.      The  Speed  parameter controls the speed of  the  explosion. 
  93. This  is done by inserting the specified delay between each  step 
  94. of the explosion. The speed is specified in milliseconds.
  95.  
  96.  
  97. Color:
  98. Pattern:
  99.      The  Color  and  Pattern parameters control  the  color  and 
  100. pattern that is used to drawn the box while it is being exploded. 
  101.  
  102.  
  103. RColor:
  104.      If  the rectangles are added to the exploding box, then  the 
  105. value passed in RColor will control the color of the rectangles.
  106.  
  107.  
  108. <eof>
  109.